package model

// Like 表示用户点赞帖子。使用联合主键防止重复点赞，关系表
type Like struct {
	UserID uint  `gorm:"primaryKey"`
	PostID uint  `gorm:"primaryKey"`
	User   *User `gorm:"foreignKey:UserID"` // 关联到 User
	Post   *Post `gorm:"foreignKey:PostID"` // 关联到 Post
}
